import 'package:flutter/material.dart';
import 'package:flutter_xyf/pages/component/app_bar/index.dart';

class SnackBarWidget extends StatelessWidget {
  const SnackBarWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: MyAppBar(
        title: 'snack Bar',
      ),
      body: Column(
        children: [
          ElevatedButton(
              onPressed: () {
                ScaffoldMessenger.of(context).showSnackBar(SnackBar(
                  content: Text('测试一下提示'),
                  duration: Duration(seconds: 3),
                ));
              },
              child: Text('提示'))
        ],
      ),
    );
  }
}
